package com.weishu.installment.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 *
 * @TableName t_cw_payment_plan
 */
@TableName(value ="t_cw_payment_plan")
@Data
public class CwPaymentPlanEntity implements Serializable {
    /**
     * 主键自增
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 付款单号
     */
    private String payOrderNo;

    /**
     * 商户ID
     */
    private Long businessId;

    /**
     * 合同ID
     */
    private Long contractId;

    /**
     * 合同编号
     */
    private String contractNo;

    /**
     * 合同类型
,"1：收房合同，
2：出房合同"
     */
    private Integer contractType;

    /**
     * 解约协议ID（解约时才有，收房是收房解约协议，出房是出房解约协议）
     */
    private Long tTerminationId;

    /**
     * 楼盘ID
     */
    private Long premiseId;

    /**
     * 小区(使用楼盘名)
     */
    private String premiseName;

    /**
     * 业主ID
     */
    private Long ownerId;

    /**
     * 业主姓名
     */
    private String ownerName;

    /**
     * 租客ID(面向租客付款时才有)
     */
    private Long tenantId;

    /**
     * 租客姓名
     */
    private String tenantName;

    /**
     * 付款类型
,1:收房付款单 2：租务付款单 3：解约结算付款 4：续约结算付款
     */
    private Integer payType;

    /**
     * 付款状态
,"1、未付款；2、已付款
3、已中止"4、 4：已冻结（未付款的时候，才会变成已冻结，所以恢复冻结状态的时候，是恢复成未收款状态）
     */
    private Integer payState;

    /**
     * 账单类型（金融属性）,"1：收房贷变更
 2：退租变更
 3：普通账单(正常收房租务计划) 4：续约结算产生的"
     */
    private Integer billType;

    /**
     * 款项（费用类型）
,1:水费 2：电费，3：煤/燃气费，80：租金，81：押金，90：解约结算，99:其它
     */
    private Integer itemType;

    /**
     * 其它款项
,款项为其它的时候，输入
     */
    private String otherItemName;

    /**
     * 支付金额（应付金额）
     */
    private BigDecimal paymentAmount;

    /**
     * 实付金额
     */
    private BigDecimal realPaymentAmount;

    /**
     * 选择账期（跟随的第几期房租对应的付款计划ID）,跟随一起付款的时候，应付日期选择设置为同一天
     */
    private Long withPayPlanId;

    /**
     * 账期开始日
     */
    private Date paymentDaysBegin;

    /**
     * 账期截止日
     */
    private Date paymentDaysEnd;

    /**
     * 预定付款日期
     */
    private Date payableDate;

    /**
     * 实际付款日期
     */
    private Date paidTime;

    /**
     * 第几期（收房付款的时候）
     */
    private Integer payNumber;

    /**
     * 线下的支付方式（直接录已付款的计划时选择的）
,1:快捷同，2：支付宝，3：微信，4：现金，5：银行卡转账，6：POS机刷卡，99：其它
     */
    private Integer payMethod;

    /**
     * 其它支付方式
,支付方式为其它的时候，输入
     */
    private String otherPayMethod;

    /**
     * 支付流水号
     */
    private String payFlowNo;

    /**
     * 租金(目前不含税，暂时和应付金额相同)
     */
    private BigDecimal rentalPrice;

    /**
     * 税费
     */
    private BigDecimal tax;

    /**
     * 操作人
     */
    private String operationUser;

    /**
     * 总期数
     */
    private Integer totalPayNumber;

    /**
     * 还款类型(手续费,担保费,本息)
     */
    private Integer repayType;

    /**
     * 备注
     */
    private String remark;

    /**
     * 预留字段1
     */
    private BigDecimal reserve1;

    /**
     * 预留字段2
     */
    private Integer reserve2;

    /**
     * 预留字段3
     */
    private String reserve3;

    /**
     * 预留字段4
     */
    private String reserve4;

    /**
     * 预留字段5
     */
    private String reserve5;

    /**
     * 删除标识
,0:未删除，1：删除
     */
    private Integer delFlg;

    /**
     * 创建用户ID
     */
    private Long createUserid;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新用户ID
     */
    private Long updateUserid;

    /**
     * 更新时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CwPaymentPlanEntity other = (CwPaymentPlanEntity) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPayOrderNo() == null ? other.getPayOrderNo() == null : this.getPayOrderNo().equals(other.getPayOrderNo()))
            && (this.getBusinessId() == null ? other.getBusinessId() == null : this.getBusinessId().equals(other.getBusinessId()))
            && (this.getContractId() == null ? other.getContractId() == null : this.getContractId().equals(other.getContractId()))
            && (this.getContractNo() == null ? other.getContractNo() == null : this.getContractNo().equals(other.getContractNo()))
            && (this.getContractType() == null ? other.getContractType() == null : this.getContractType().equals(other.getContractType()))
          //  && (this.gettTerminationId() == null ? other.gettTerminationId() == null : this.gettTerminationId().equals(other.gettTerminationId()))
            && (this.getPremiseId() == null ? other.getPremiseId() == null : this.getPremiseId().equals(other.getPremiseId()))
            && (this.getPremiseName() == null ? other.getPremiseName() == null : this.getPremiseName().equals(other.getPremiseName()))
            && (this.getOwnerId() == null ? other.getOwnerId() == null : this.getOwnerId().equals(other.getOwnerId()))
            && (this.getOwnerName() == null ? other.getOwnerName() == null : this.getOwnerName().equals(other.getOwnerName()))
            && (this.getTenantId() == null ? other.getTenantId() == null : this.getTenantId().equals(other.getTenantId()))
            && (this.getTenantName() == null ? other.getTenantName() == null : this.getTenantName().equals(other.getTenantName()))
            && (this.getPayType() == null ? other.getPayType() == null : this.getPayType().equals(other.getPayType()))
            && (this.getPayState() == null ? other.getPayState() == null : this.getPayState().equals(other.getPayState()))
            && (this.getBillType() == null ? other.getBillType() == null : this.getBillType().equals(other.getBillType()))
            && (this.getItemType() == null ? other.getItemType() == null : this.getItemType().equals(other.getItemType()))
            && (this.getOtherItemName() == null ? other.getOtherItemName() == null : this.getOtherItemName().equals(other.getOtherItemName()))
            && (this.getPaymentAmount() == null ? other.getPaymentAmount() == null : this.getPaymentAmount().equals(other.getPaymentAmount()))
            && (this.getRealPaymentAmount() == null ? other.getRealPaymentAmount() == null : this.getRealPaymentAmount().equals(other.getRealPaymentAmount()))
            && (this.getWithPayPlanId() == null ? other.getWithPayPlanId() == null : this.getWithPayPlanId().equals(other.getWithPayPlanId()))
            && (this.getPaymentDaysBegin() == null ? other.getPaymentDaysBegin() == null : this.getPaymentDaysBegin().equals(other.getPaymentDaysBegin()))
            && (this.getPaymentDaysEnd() == null ? other.getPaymentDaysEnd() == null : this.getPaymentDaysEnd().equals(other.getPaymentDaysEnd()))
            && (this.getPayableDate() == null ? other.getPayableDate() == null : this.getPayableDate().equals(other.getPayableDate()))
            && (this.getPaidTime() == null ? other.getPaidTime() == null : this.getPaidTime().equals(other.getPaidTime()))
            && (this.getPayNumber() == null ? other.getPayNumber() == null : this.getPayNumber().equals(other.getPayNumber()))
            && (this.getPayMethod() == null ? other.getPayMethod() == null : this.getPayMethod().equals(other.getPayMethod()))
            && (this.getOtherPayMethod() == null ? other.getOtherPayMethod() == null : this.getOtherPayMethod().equals(other.getOtherPayMethod()))
            && (this.getPayFlowNo() == null ? other.getPayFlowNo() == null : this.getPayFlowNo().equals(other.getPayFlowNo()))
            && (this.getRentalPrice() == null ? other.getRentalPrice() == null : this.getRentalPrice().equals(other.getRentalPrice()))
            && (this.getTax() == null ? other.getTax() == null : this.getTax().equals(other.getTax()))
            && (this.getOperationUser() == null ? other.getOperationUser() == null : this.getOperationUser().equals(other.getOperationUser()))
            && (this.getTotalPayNumber() == null ? other.getTotalPayNumber() == null : this.getTotalPayNumber().equals(other.getTotalPayNumber()))
            && (this.getRepayType() == null ? other.getRepayType() == null : this.getRepayType().equals(other.getRepayType()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getReserve1() == null ? other.getReserve1() == null : this.getReserve1().equals(other.getReserve1()))
            && (this.getReserve2() == null ? other.getReserve2() == null : this.getReserve2().equals(other.getReserve2()))
            && (this.getReserve3() == null ? other.getReserve3() == null : this.getReserve3().equals(other.getReserve3()))
            && (this.getReserve4() == null ? other.getReserve4() == null : this.getReserve4().equals(other.getReserve4()))
            && (this.getReserve5() == null ? other.getReserve5() == null : this.getReserve5().equals(other.getReserve5()))
            && (this.getDelFlg() == null ? other.getDelFlg() == null : this.getDelFlg().equals(other.getDelFlg()))
            && (this.getCreateUserid() == null ? other.getCreateUserid() == null : this.getCreateUserid().equals(other.getCreateUserid()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateUserid() == null ? other.getUpdateUserid() == null : this.getUpdateUserid().equals(other.getUpdateUserid()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPayOrderNo() == null) ? 0 : getPayOrderNo().hashCode());
        result = prime * result + ((getBusinessId() == null) ? 0 : getBusinessId().hashCode());
        result = prime * result + ((getContractId() == null) ? 0 : getContractId().hashCode());
        result = prime * result + ((getContractNo() == null) ? 0 : getContractNo().hashCode());
        result = prime * result + ((getContractType() == null) ? 0 : getContractType().hashCode());
      //  result = prime * result + ((gettTerminationId() == null) ? 0 : gettTerminationId().hashCode());
        result = prime * result + ((getPremiseId() == null) ? 0 : getPremiseId().hashCode());
        result = prime * result + ((getPremiseName() == null) ? 0 : getPremiseName().hashCode());
        result = prime * result + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode());
        result = prime * result + ((getOwnerName() == null) ? 0 : getOwnerName().hashCode());
        result = prime * result + ((getTenantId() == null) ? 0 : getTenantId().hashCode());
        result = prime * result + ((getTenantName() == null) ? 0 : getTenantName().hashCode());
        result = prime * result + ((getPayType() == null) ? 0 : getPayType().hashCode());
        result = prime * result + ((getPayState() == null) ? 0 : getPayState().hashCode());
        result = prime * result + ((getBillType() == null) ? 0 : getBillType().hashCode());
        result = prime * result + ((getItemType() == null) ? 0 : getItemType().hashCode());
        result = prime * result + ((getOtherItemName() == null) ? 0 : getOtherItemName().hashCode());
        result = prime * result + ((getPaymentAmount() == null) ? 0 : getPaymentAmount().hashCode());
        result = prime * result + ((getRealPaymentAmount() == null) ? 0 : getRealPaymentAmount().hashCode());
        result = prime * result + ((getWithPayPlanId() == null) ? 0 : getWithPayPlanId().hashCode());
        result = prime * result + ((getPaymentDaysBegin() == null) ? 0 : getPaymentDaysBegin().hashCode());
        result = prime * result + ((getPaymentDaysEnd() == null) ? 0 : getPaymentDaysEnd().hashCode());
        result = prime * result + ((getPayableDate() == null) ? 0 : getPayableDate().hashCode());
        result = prime * result + ((getPaidTime() == null) ? 0 : getPaidTime().hashCode());
        result = prime * result + ((getPayNumber() == null) ? 0 : getPayNumber().hashCode());
        result = prime * result + ((getPayMethod() == null) ? 0 : getPayMethod().hashCode());
        result = prime * result + ((getOtherPayMethod() == null) ? 0 : getOtherPayMethod().hashCode());
        result = prime * result + ((getPayFlowNo() == null) ? 0 : getPayFlowNo().hashCode());
        result = prime * result + ((getRentalPrice() == null) ? 0 : getRentalPrice().hashCode());
        result = prime * result + ((getTax() == null) ? 0 : getTax().hashCode());
        result = prime * result + ((getOperationUser() == null) ? 0 : getOperationUser().hashCode());
        result = prime * result + ((getTotalPayNumber() == null) ? 0 : getTotalPayNumber().hashCode());
        result = prime * result + ((getRepayType() == null) ? 0 : getRepayType().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getReserve1() == null) ? 0 : getReserve1().hashCode());
        result = prime * result + ((getReserve2() == null) ? 0 : getReserve2().hashCode());
        result = prime * result + ((getReserve3() == null) ? 0 : getReserve3().hashCode());
        result = prime * result + ((getReserve4() == null) ? 0 : getReserve4().hashCode());
        result = prime * result + ((getReserve5() == null) ? 0 : getReserve5().hashCode());
        result = prime * result + ((getDelFlg() == null) ? 0 : getDelFlg().hashCode());
        result = prime * result + ((getCreateUserid() == null) ? 0 : getCreateUserid().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateUserid() == null) ? 0 : getUpdateUserid().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", payOrderNo=").append(payOrderNo);
        sb.append(", businessId=").append(businessId);
        sb.append(", contractId=").append(contractId);
        sb.append(", contractNo=").append(contractNo);
        sb.append(", contractType=").append(contractType);
        sb.append(", tTerminationId=").append(tTerminationId);
        sb.append(", premiseId=").append(premiseId);
        sb.append(", premiseName=").append(premiseName);
        sb.append(", ownerId=").append(ownerId);
        sb.append(", ownerName=").append(ownerName);
        sb.append(", tenantId=").append(tenantId);
        sb.append(", tenantName=").append(tenantName);
        sb.append(", payType=").append(payType);
        sb.append(", payState=").append(payState);
        sb.append(", billType=").append(billType);
        sb.append(", itemType=").append(itemType);
        sb.append(", otherItemName=").append(otherItemName);
        sb.append(", paymentAmount=").append(paymentAmount);
        sb.append(", realPaymentAmount=").append(realPaymentAmount);
        sb.append(", withPayPlanId=").append(withPayPlanId);
        sb.append(", paymentDaysBegin=").append(paymentDaysBegin);
        sb.append(", paymentDaysEnd=").append(paymentDaysEnd);
        sb.append(", payableDate=").append(payableDate);
        sb.append(", paidTime=").append(paidTime);
        sb.append(", payNumber=").append(payNumber);
        sb.append(", payMethod=").append(payMethod);
        sb.append(", otherPayMethod=").append(otherPayMethod);
        sb.append(", payFlowNo=").append(payFlowNo);
        sb.append(", rentalPrice=").append(rentalPrice);
        sb.append(", tax=").append(tax);
        sb.append(", operationUser=").append(operationUser);
        sb.append(", totalPayNumber=").append(totalPayNumber);
        sb.append(", repayType=").append(repayType);
        sb.append(", remark=").append(remark);
        sb.append(", reserve1=").append(reserve1);
        sb.append(", reserve2=").append(reserve2);
        sb.append(", reserve3=").append(reserve3);
        sb.append(", reserve4=").append(reserve4);
        sb.append(", reserve5=").append(reserve5);
        sb.append(", delFlg=").append(delFlg);
        sb.append(", createUserid=").append(createUserid);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateUserid=").append(updateUserid);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
